package cn.zwx.order.query.svc.mapper;

import cn.zwx.order.query.svc.domain.entity.OrderEntity;
import org.springframework.data.elasticsearch.annotations.Query;
import org.springframework.data.elasticsearch.repository.ElasticsearchRepository;

/**
 * @author zhangwenxue
 */
public interface OrderRepository extends ElasticsearchRepository<OrderEntity,String> {


    /**
     * 根据OrderId查询订单信息
     * @param orderId 订单id
     * @return 返回订单信息
     */
    @Query("{\"term\": {\"orderId\": \"?0\"}}")
    OrderEntity selectByOrderId(String orderId);
}
